Previous Book Contents Next

Inside Macintosh: What's New in ColorSync 2.5 /


Scripting Support

ColorSync 2.5 provides AppleScript support that allows users to script many common color-matching tasks. To provide this support, ColorSync now runs as a faceless background application (one with no user interface), rather than as a standard extension. By running as a background application, ColorSync can avoid namespace collisions and time-outs during long operations, and it can have its own AppleScript dictionary.

Note

You can examine ColorSync's full AppleScript dictionary by dragging the file "ColorSync Extension" from your Extensions folder onto the Script Editor application (usually located in the AppleScript folder within the Apple Extras folder).

Scriptable Properties

ColorSync provides scriptable support for getting and setting the following properties:

For the following, you can only get, not set, the property:

Location is the only property currently supported for profiles, but future support is planned for additional profile properties.

Scriptable Operations

ColorSync supports the following scriptable operations:

Scriptable image operations currently work only on TIFF files, but support for other formats is planned.

Extending the Scripting Framework

The scripting framework uses a plug-in architecture that is fully accessible to third-party scripting plug-ins. When a user invokes a script to perform a ColorSync operation on an image, ColorSync (operating as a faceless background application) automatically builds a list of all available scripting plug-ins. It then attempts to call each of the plug-ins in the list until one of them successfully executes the desired operation. To appear in the list, a plug-in must meet the following criteria:

Sample Scripts

The ColorSync SDK includes several sample scripts that demonstrate how to perform common operations. You can use the scripts as is, or borrow from them for your own custom scripts. For more information, see the detailed Read Me files that accompany the sample scripts.


Previous Book Contents Next